package com.heihx.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "用户实体")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "主键值")
    private Long id;

    //微信用户唯一标识
    @Schema(description = "微信用户标识")
    private String openid;

    //姓名
    @Schema(description = "姓名")
    private String name;

    //手机号
    @Schema(description = "手机号")
    private String phone;

    //性别 0 女 1 男
    @Schema(description = "性别")
    private String sex;

    //身份证号
    @Schema(description = "身份证号")
    private String idNumber;

    //头像
    @Schema(description = "头像")
    private String avatar;

    //注册时间
    @Schema(description = "注册时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
}
